﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="GoiHang.aspx.cs" Inherits="GomMinhLong.GoiHang" %>

<%@ Register Src="~/Module/ucBreadcrumb.ascx" TagName="ucBreadcrumb" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .h3Detail
        {
            text-transform: uppercase;
            font-size: 14px;
            color: #5A5A5A;
            font-weight: bold;
        }
        td 
        {
        	vertical-align:middle;
        }
        th
        {vertical-align:middle;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="GioHangNoiDung">
        <div class="under-right">
            <uc3:ucBreadcrumb ID="ucBreadcrumb" runat="server"></uc3:ucBreadcrumb>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <p style="float: left; width: 100%; color: Red; text-align: center;">
                    <asp:Label ID="lbl" runat="server"></asp:Label>
                    </p>
                    <asp:GridView runat="server" ID="GridGioHang" AutoGenerateColumns="False" EmptyDataText="Không có dữ liệu !"
                        AllowPaging="True" OnPageIndexChanging="GridGioHang_PageIndexChanging" OnRowCommand="GridGioHang_RowCommand"
                        CellPadding="2" Width="700px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="Solid"
                        BorderWidth="1px" OnRowDataBound="GridGioHang_RowDataBound" DataKeyNames="STT">
                        <RowStyle BackColor="White" VerticalAlign="Middle" ForeColor="#330099" />
                        <Columns>
                            <asp:TemplateField HeaderText="STT" ItemStyle-Width="16px">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lbSTT" Text="<%# Container.DataItemIndex + 1 %>">
                                    </asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                            </asp:TemplateField>
                              <asp:TemplateField HeaderText="Ảnh" ItemStyle-Width="65px">
                                <ItemTemplate>
                                    <a class="fackybox" href="/Media/<%#Eval("HinhAnh")%>" />
                                    <img src="/Media/<%#Eval("HinhAnh")%>" height="47px" width="47px" style=" margin:10px; border:1px solid #DFE5E9; padding:2px;" alt="<%#DataBinder.Eval(Container.DataItem,"TenSanPham") %>" />
                                    </a>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Tên sản phẩm" ItemStyle-Width="180px">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="txtTen" Text='<%#DataBinder.Eval(Container.DataItem,"TenSanPham") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Font-Bold="true" VerticalAlign="Middle" />
                            </asp:TemplateField>
                          
                            <asp:TemplateField HeaderText="Số lượng" ItemStyle-Width="50px">
                                <ItemTemplate>
                                    <asp:TextBox runat="server" OnTextChanged="Calc" AutoPostBack="true" ID="txtSL" Width="50px"
                                        Text='<%#DataBinder.Eval(Container.DataItem,"SoLuong") %>'>
                                    </asp:TextBox>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Đơn giá" ItemStyle-HorizontalAlign="Center"
                                ItemStyle-Width="90px">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lbDG" Text='<%#DataBinder.Eval(Container.DataItem,"DonGia") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Thành tiền" ItemStyle-HorizontalAlign="Center"
                                ItemStyle-Width="110px">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lbThanhTien" Font-Bold="true" Text='<%#DataBinder.Eval(Container.DataItem,"ThanhTien") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="img_xoa" CommandName="xoa" OnClientClick="return confirm('Bạn có muốn loại bỏ sản phẩm này ra khỏi giỏ hàng?')"
                                        CommandArgument='<%#DataBinder.Eval(Container.DataItem,"STT") %>' ImageUrl="/images/remove.png" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="20px" VerticalAlign="Middle" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                        <HeaderStyle HorizontalAlign="Center" Height="30px" BackColor="#EAEEF0" VerticalAlign="Middle" Font-Bold="True" ForeColor="#000"  />
                    </asp:GridView>
                    <br />
                    <div style="float: left; width: 100%; margin: 10px 0px 10px 0px; font-size:13px; text-align: right;">
                        <asp:Label ID="lblSum" runat="server"></asp:Label><br />
                        <br />
                        <asp:Label ID="lbThanhTien" runat="server"></asp:Label>
                        <br />
                        <br />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div align="center" style="float: left; width: 100%; margin-top: 20px;" class="ltr dGioHang">
                <div style="float:left; text-align:left;">
                <a href="/San-Pham/All/San-Pham.htm" class="cart_link">
                    <asp:Literal ID="Literal1" runat="server" Text="Tiếp tục mua hàng"></asp:Literal></a>
                </div>
                <div style="float:right; text-align:right;">
                    <asp:HyperLink runat="server" ID="lbThanhtoan" CssClass="cart_link" Text="Gửi đơn hàng"
                    NavigateUrl="/Gui-Gio-Hang.htm"></asp:HyperLink>
                </div>
            </div>
        </div>
    </div>
</asp:Content>